package org.advanced.generic;

import java.util.ArrayList;
import java.util.List;

/**
 * @author John.zhang
 * @version Id: Character, v 1.0 2020/12/3 16:30 ZhiYong Exp $
 */
public class Character {

    public static void main(String[] args) {
        List<String> objects = new ArrayList<>();
        lookup(objects);
        List<Number> objectNumbers = new ArrayList<>();
        lookupNumber(objectNumbers);
        lookupInteger(objectNumbers);
    }

    public static void lookup(List<?> list) {
        System.out.println(list);
    }

    public static void lookupNumber(List<? extends Number> list) {
        System.out.println(list);
    }

    public static void lookupInteger(List<? super Integer> list) {
        System.out.println(list);
    }
}
